package com.exam.api.modules.exampaper.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.exam.api.modules.exampaper.domain.TblExamPaperQuestion;
import com.exam.api.modules.exampaper.mapper.TblExamPaperQuestionMapper;
import com.exam.api.modules.exampaper.service.TblExamPaperQuestionService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 试卷题目明细表服务实现类
 */
@Service
public class TblExamPaperQuestionServiceImpl extends ServiceImpl<TblExamPaperQuestionMapper, TblExamPaperQuestion> implements TblExamPaperQuestionService {

    @Override
    public void removeByExamPaperId(Long examPaperId) {
        lambdaUpdate().eq(TblExamPaperQuestion::getExamPaperId, examPaperId).remove();
    }

    @Override
    public List<TblExamPaperQuestion> listByExamPaperId(Long examPaperId) {
        return lambdaQuery().eq(TblExamPaperQuestion::getExamPaperId, examPaperId).list();
    }
}